<template>
  <m-page>
    <!-- 借款申请页 -->
    <m-header title="借款申请"></m-header>
    <div class="amount">借款金额</div>
    <div class="input-box">
      <span class="rmb">¥</span>
      <input type="text" placeholder="最多可借额度39000.00元">
    </div>
    <div class="tips">金额必须是1000的倍数，最低10000，单笔最多不超过500000</div>
    <div class="check-box check-box1" @click="selectUse('bottom')">
      <div class="left">借款用途</div>
      <div class="middle">其它经营相关事项</div>
      <ynet-icon name="arrow-right" class="arrow" svg></ynet-icon>
    </div>
    <div class="check-box check-box2">
      <div class="left" style="margin-right:0.7rem">还款方式</div>
      <div class="middle">到期还本付息
        <ynet-icon name="question"  size="md" color="red"></ynet-icon>
      </div>
    </div>
    <div class="check-box">
      <div class="left">借款期限</div>
      <div class="middle">24个月</div>
      <ynet-icon name="arrow-right" class="arrow" svg></ynet-icon>
    </div>
    <div class="check-box" @click="changeAccount">
      <div class="left">收款账户</div>
      <div class="middle">长沙银行储蓄卡</div>
      <ynet-icon name="arrow-right" class="arrow" svg></ynet-icon>
    </div>
    <ynet-button type="primary" class="next" @click="handleNext">下一步</ynet-button>
    <div class="tips1">
      <p>温馨提示</p>
      <p class="tips-item">1.收款账户仅支持长沙银行卡</p>
      <p class="tips-item">2.收款账户仅支持长沙银行卡</p>
      <p class="tips-item">3.收款账户仅支持长沙银行卡</p>
    </div>
    <ynet-popup v-model="isPopupShow">
      <div class="">
        111
      </div>
    </ynet-popup>
  </m-page>
</template>

<script>
import ynetPopup from "@components/popup/index";
import ynetIcon from "@components/icon/index";
import ynetButton from "@components/button/index";
  export default {
    components: {
      ynetIcon,
      ynetButton,
      ynetPopup
    },
    data() {
      return {
        isPopupShow: false
      }
    },
    methods: {
      changeAccount() {
        app.api.alert('获取信用卡列表错误');
        console.log(111);
//         let msg = '如果更换还款账户，其它长湘贷的还款账户都将更换为新的还款账户，是否继续更换。';
//         app.api.confirm(msg, '', { okButton: '前往开通', cancelButton: '暂不处理' }).then(res => {
//             if (res.ok) {
//               // 跳转到云盾服务页
//             } else {
//               // 返回长湘贷宣传页（已办理）页【签约和贷款按钮不可用】
//             }
//         });
        
      },
      selectUse() {
        this.isPopupShow = true;
      },
      handleNext() {
        if (this.money === '') {
          app.api.showToast('请输入借款金额')
          return
        }
        // 跳转到借款确认页
        let params = {}
        app.api.pushWindow(
          "long_xiang_loans/loans_borrow_confirm.html",
          params
        )
      }
    },
    created() {},
    mounted() {},
    watch: {},
    computed: {}
  }
</script>

<style lang="scss" scoped>
  @import './index.scss';
</style>

